ul class="nav navbar-nav"
  li= link_to('<span class="glyphicon glyphicon-home"></span> 主页'.html_safe, root_path)
  - if current_user
    li= link_to('<span class="glyphicon glyphicon-lock"></span> Secret'.html_safe, secret_path)

ul class="nav navbar-nav navbar-right"
  - if current_user
    li= link_to('<span class="glyphicon glyphicon-cog"></span> Settings'.html_safe, edit_user_registration_path)
    li= link_to('<span class="glyphicon glyphicon-off"></span> Log out'.html_safe, destroy_user_session_path, method: 'delete')
  - else
    li= link_to('<span class="glyphicon glyphicon-log-in"></span> 登陆'.html_safe, new_user_session_path)
    li= link_to('<span class="glyphicon glyphicon-saved"></span> 注册'.html_safe, new_user_registration_path)